package com.icode.core.model.user;

import com.icode.core.dto.user.MemberDTO;
import com.icode.core.model.AbstractEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-3-16
 * Time: 上午10:12
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "member")
public class Member extends AbstractEntity {

    private String name;
    private String gender;
    private String idCard;
    private String phoneNum;
    private String telephone;
    private String birthday;
    private String age;
    @Column(name = "idCard_address")
    private String idCardAddress;
    @Column(name = "resident_city")
    private String residentCity;
    private String initiateDate;
    private String initiateMoney;
    private String accountDetail;
    private String hobby;
    private String customService;
    private String entryPerson;

    public Member() {
    }

    public Member(String name, String gender, String idCard, String phoneNum, String telephone, String birthday, String age, String idCardAddress, String residentCity, String initiateDate, String initiateMoney, String accountDetail, String hobby, String customService, String entryPerson) {
        this.name = name;
        this.gender = gender;
        this.idCard = idCard;
        this.phoneNum = phoneNum;
        this.telephone = telephone;
        this.birthday = birthday;
        this.age = age;
        this.idCardAddress = idCardAddress;
        this.residentCity = residentCity;
        this.initiateDate = initiateDate;
        this.initiateMoney = initiateMoney;
        this.accountDetail = accountDetail;
        this.hobby = hobby;
        this.customService = customService;
        this.entryPerson = entryPerson;
    }

    public void initMember(MemberDTO memberDTO) {
        this.name = memberDTO.getName();
        this.gender = memberDTO.getGender();
        this.idCard = memberDTO.getIdCard();
        this.phoneNum = memberDTO.getPhoneNum();
        this.telephone = memberDTO.getTelephone();
        this.birthday = memberDTO.getBirthday();
        this.age = memberDTO.getAge();
        this.idCardAddress = memberDTO.getIdCardAddress();
        this.residentCity = memberDTO.getResidentCity();
        this.initiateDate = memberDTO.getInitiateDate();
        this.initiateMoney = memberDTO.getInitiateMoney();
        this.accountDetail = memberDTO.getAccountDetail();
        this.hobby = memberDTO.getHobby();
        this.customService = memberDTO.getCustomService();
        this.entryPerson = memberDTO.getEntryPerson();
    }

    public String name() {
        return name;
    }

    public String gender() {
        return gender;
    }

    public String idCard() {
        return idCard;
    }

    public String telephone() {
        return telephone;
    }

    public String phoneNum() {

        return phoneNum;
    }

    public String birthday() {
        return birthday;
    }

    public String age() {
        return age;
    }

    public String idCardAddress() {
        return idCardAddress;
    }

    public String residentCity() {
        return residentCity;
    }

    public String initiateDate() {
        return initiateDate;
    }

    public String initiateMoney() {
        return initiateMoney;
    }

    public String accountDetail() {
        return accountDetail;
    }

    public String hobby() {
        return hobby;
    }

    public String customService() {
        return customService;
    }

    public String entryPerson() {
        return entryPerson;
    }
}
